import requst from '../../../util/Http.js'
Page({
  data: {
    imgUrls: [
      '/image/b1.jpg',
      '/image/b2.jpg',
      '/image/b3.jpg'
    ],
    zhutiList:[],
    zhutiListitem:{},
    zuixinList:[],
    indicatorDots: false,
    autoplay: false,
    interval: 3000,
    duration: 800,
  },
   onLoad(){
     let than=this;
      //  轮播图
       requst('Index/getBannerList',{id:1},'post').then(res=>{
         than.setData({
           imgUrls:res.data.items
         })
       })
      //  主题
       requst('Index/getzhuti',{},'post').then(res=>{
        let arr=res.data.pop()
        than.setData({
          zhutiListitem:arr,
          zhutiList:res.data
        })
      })
         //  最进新品
         requst('Index/getzuixinlist',{count:10},'post').then(res=>{
          than.setData({
            zuixinList:res.data
          })
        })
  }
})